package com.kinpoway.services;

import com.kinpoway.domin.User;
import com.kinpoway.querycondition.UserQueryCondition;
import com.kinpoway.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class UserService  {

    @Autowired
    private UserRepository userRepository;

    // 保存或更新一个用户
    @Transactional
    public User save(User user){
       return userRepository.save(user);
    }


    public List<User> filterListGetUsers(UserQueryCondition userQueryCondition){

        Object object = filterQureyConditionParam(userQueryCondition);
        return null;
    }

    private Object filterQureyConditionParam (Object object){



        return object;
    }
}
